/*
 * @(#)WatijUtils.java
 *
 *
 *
 * ver 1.0 Aug 16, 2007 ggranum
 */
package org.testfire.util;

public class WatijUtils
{

    /**
     * The required imports and the package definition for a java test set file.
     * @param _package The package path.
     * @param setName the name of the testset (will be used as the name of the java file).
     * @return A string builder that has the declaration of the class.
     */
    public static StringBuilder getTestFileHeader( String _package, String setName )
    {
        StringBuilder buf = new StringBuilder();

        if(_package != null && _package.length() > 0){
            buf.append( "package " ).append( _package ).append( ";\n" );
        }
        buf.append( "import java.io.File;\n" );
        buf.append( "import junit.framework.TestCase;\n" );
        buf.append( "import org.w3c.dom.Document;\n" );
        buf.append( "import org.w3c.dom.Element;\n" );
        buf.append( "import watij.WatijBrowser;\n" );
        buf.append( "import watij.elements.*;\n" );
        buf.append( "import static watij.finders.FinderFactory.*;\n" );
        buf.append( "import watij.finders.SymbolFactory;\n" );
        buf.append( "import watij.runtime.ie.IE;\n" );
        buf.append( "public class " ).append( setName ).append( " extends TestCase \n{\n" );



        return buf;
    }
}

// eof: WatijUtils.java